package com.itheima.admin.task;

import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import com.xxl.job.core.log.XxlJobLogger;
import org.springframework.stereotype.Component;

@Component
public class TaskTest {
    @XxlJob("myJob")//执行器名称myJob
    public ReturnT<String> doMyJob(String param){
        XxlJobLogger.log("服务端的日志，触发任务成功。");
        System.err.println("运行了我的方法......"+param);
        return ReturnT.SUCCESS;
    }
}
